<ion-list class="list-schedule" *ngIf="addSchedule">
    <!--标题-->
    <ion-item class="titleItem device-pixel-border-bottom">
        <ion-label>
            <span>日程标题</span>
        </ion-label>
        <ion-input type="text"  input-content-length="30" maxlength="30"  class="note"
                   placeholder="请填写日程标题" [(ngModel)]="data.name" (ionChange)="changeData()" (input)="editTitle($event)" (blur)="blurTitle()"></ion-input>
    </ion-item>
    <!--开始时间-->
    <ion-item class="setItem device-pixel-border-bottom" #datetime>
        <ion-label>
            <span>开始时间</span>
        </ion-label>
        <ion-icon name="arrow" item-end="pageType!=2"></ion-icon>
        <ion-datetime cancelText="取消" doneText="确定" min="2010" max="2100" displayFormat="YYYY年MM月DD日 HH:mm"
                      pickerFormat="YYYYMMDD HH:mm" yearValues="{{startYearList}}" minuteValues="[00,5,10,15,20,25,30,35,40,45,50,55]"
                      [(ngModel)]="timerStr.startTimeStr"
                      (ionChange)="onStartTimeChange()"
                      [pickerOptions]="pickerOptions"></ion-datetime>
    </ion-item>
    <!--结束时间-->
    <ion-item class="setItem device-pixel-border-bottom">
        <ion-label>
            <span>结束时间</span>
        </ion-label>
        <ion-icon name="arrow" item-end></ion-icon>
        <ion-datetime cancelText="取消" doneText="确定" displayFormat="YYYY年MM月DD日 HH:mm" pickerFormat="YYYYMMDD HH:mm"
                      minuteValues="[00,5,10,15,20,25,30,35,40,45,50,55]" [(ngModel)]="timerStr.endTimeStr" yearValues="{{endYearList}}"
                      [pickerOptions]="pickerOptions"  max="2100"
                      min="{{timerStr.startTimeStr}}" (ionChange)="onEndTimeChange()"
        ></ion-datetime>
    </ion-item>
    <!--重复-->
    <ion-item class="setItem device-pixel-border-bottom">
        <ion-label>
            是否重复
        </ion-label>
        <ion-icon name="arrow" item-end></ion-icon>
        <ion-select interface="action-sheet" cancelText="取消" okText="确定" [(ngModel)]="data.frequency" (ionChange)="changeData()" >
            <ion-option [value]=1>永不</ion-option>
            <ion-option [value]=2>每天</ion-option>
            <ion-option [value]=3>每周</ion-option>
            <ion-option [value]=4>每月</ion-option>
            <ion-option [value]=5>每年</ion-option>
        </ion-select>
    </ion-item>
    <!--是否结束重复-->
    <ion-item class="setItem device-pixel-border-bottom" *ngIf="data.frequency!==1" (click)="openEndRepeat(timerStr.endTimeStr)">
        <ion-label>
            结束重复
        </ion-label>
        <ion-icon name="arrow" item-end></ion-icon>
        <ion-label class="value">
            <span class="grayResult">{{getEndRepeatTime(endRepeat)}}</span>
        </ion-label>
    </ion-item>
    <!--提醒-->
    <ion-item class="aloneItem setItem device-pixel-border-bottom">
        <ion-label>
            提醒
        </ion-label>
        <ion-icon name="arrow" item-end></ion-icon>
        <ion-select interface="action-sheet" [(ngModel)]="data.reminder" cancelText="取消" okText="确定" (ionChange)="changeData()">
            <ion-option [value]=1>无</ion-option>
            <ion-option [value]=2>日程开始时</ion-option>
            <ion-option [value]=3>15分钟前</ion-option>
            <ion-option [value]=4>1小时前</ion-option>
            <ion-option [value]=5>1天前</ion-option>
        </ion-select>
    </ion-item>
</ion-list>
